﻿#region File and License Information
/*
<File>
	<License>
		Copyright © 2009 - 2017, Daniel Vaughan. All rights reserved.
		This file is part of Calcium (http://calciumsdk.net), 
		which is released under the MIT License.
		See file /Documentation/License.txt for details.
	</License>
	<CreationDate>2013-01-16 19:58:32Z</CreationDate>
</File>
*/
#endregion

using System;
using System.Globalization;

using System.Windows.Data;
using System.Windows.Media;

namespace Outcoder.UI.Xaml.Converters
{
	public class BooleanToBrushConverter : IValueConverter
	{
		public Brush BrushIfFalse { get; set; }
		public Brush BrushIfTrue { get; set; }

		public object Convert(
			object value, Type targetType, object parameter, CultureInfo culture)
		{
			return value != null && (bool)value ? BrushIfTrue : BrushIfFalse;
		}

		public object ConvertBack(
			object value, Type targetType, object parameter, CultureInfo culture)
		{
			throw new NotImplementedException();
		}
	}
}